<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="peoit" tagdir="/WEB-INF/tags"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<peoit:include>
	<div class="pd-20">
		<form action="<c:url value="/admin/permission/permissionAdd"/>" method="post" class="form form-horizontal" id="form-permission-add">
			<div class="row cl">
				<label class="form-label col-3"><span class="c-red">*</span>所在菜单：</label>
				<div class="formControls col-5">
					<span class="select-box"> <select name="inWhere" class="select" datatype="*" nullmsg="请选择权限所在的菜单">
							<option value="" selected>选择权限所在菜单</option>
							<option value="1">会员管理</option>
							<option value="1-1">会员列表</option>
							<option value="1-2">会员审核</option>
							<option value="2">项目管理</option>
							<option value="2-1">项目列表</option>
							<option value="3">资讯管理</option>
							<option value="3-1">资讯列表</option>
							<option value="5">Banner管理</option>
							<option value="5-1">Banner列表</option>
							<option value="4">系统管理</option>
							<option value="4-1">管理员列表</option>
							<option value="4-2">角色列表</option>
							<option value="4-3">权限列表</option>
							<option value="4-4">短信模板</option>
							<option value="4-5">项目类型</option>
					</select>

					</span>
				</div>
				<div class="col-4"></div>
			</div>
			<div class="row cl">
				<label class="form-label col-3"><span class="c-red">*</span>父权限名称：</label>
				<div class="formControls col-5">
					<span class="select-box"> <select name="parentPermissionId" class="select" datatype="*" nullmsg="请选择父权限">
							<option value="">=====无=====</option>
							<c:forEach items="${viewData}" var="plist">
								<option value="${plist.id}">${plist.description}</option>
							</c:forEach>
					</select>

					</span>
				</div>
				<div class="col-4"></div>
			</div>

			<div class="row cl">
				<label class="form-label col-3"><span class="c-red">*</span>权限名称：</label>
				<div class="formControls col-5">
					<input type="text" class="input-text" placeholder="必须是英文字母加者下划线" id="user-name" name="name" datatype="s,*" errormsg="权限名称必须是英文字母加者下划线" nullmsg="权限名称不能为空">
				</div>
				<%--<div class="col-4" style="color: red;">必须是英文字母加者下划线</div>--%>
			</div>
			<div class="row cl">
				<label class="form-label col-3"><span class="c-red">*</span>描述：</label>
				<div class="formControls col-5">
					<input type="text" placeholder="请输入描述" name="description" autocomplete="off" datatype="*" class="input-text">
				</div>
				<div class="col-4"></div>
			</div>

			<div class="row cl">
				<div class="col-9 col-offset-3">
					<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
				</div>
			</div>
		</form>
	</div>
</peoit:include>
<script type="text/javascript">
	function refreshAndColse() {
		window.parent.location.href = window.parent.location;
	}
	$(function() {
		//表单验证ajax提交
		$("#form-permission-add").Validform({
			tiptype : 3,
			callback : function(form) {
				$("#form-permission-add").ajaxSubFromDialog(this);
				setTimeout(refreshAndColse, 1500);
				return false;
			}
		});

		$('.skin-minimal input').iCheck({
			checkboxClass : 'icheckbox-blue',
			radioClass : 'iradio-blue',
			increaseArea : '20%'
		});
	});
</script>